<template>
  <div>
    <h4>这个是子组件</h4>
    <p>这个是子组件中的aa： {{ aa }}-----{{ bb }}</p>
    <button @click="hClick">add加1操作</button>
  </div>
</template>

<script>
export default {
  props: {
    // 接收父组件传过来的值 value
    aa: {
      type: Number,
      required: true
    },
    bb: {
      type: Number,
      required: true

    }
  },
  methods: {
    hClick() {
      this.$emit('update:aa', this.aa + 1)
      this.$emit('update:bb', this.bb + 1)
    }
  }
}
</script>

<style>

</style>
